package com.jintian.smart.base.api.demo.entity;

import com.jintian.smart.base.api.demo.constant.CategoryTypeEnum;
import com.jintian.smart.kernel.core.domain.IEntity;
import lombok.Data;
import org.beetl.sql.annotation.builder.FillStrategy;
import org.beetl.sql.annotation.builder.UpdateTime;
import org.beetl.sql.annotation.entity.AssignID;
import org.beetl.sql.annotation.entity.Table;

import java.time.LocalDateTime;

/**
 * 类目 实体类
 */
@Data
@Table(name = "demo_category")
public class CategoryBaseEntity implements IEntity {
    private static final long serialVersionUID = 1L;

    @AssignID("snowid")
    private Long categoryId;

    /**
     * 类目名称
     */
    private String categoryName;

    /**
     * 类目 类型
     *
     * @see CategoryTypeEnum
     */
    private Integer categoryType;

    /**
     * 父级类目id
     */
    private Long parentId;

    /**
     * 是否禁用
     */
    private Integer disabledFlag;

    /**
     * 排序
     */
    private Integer sort;

    /**
     * 删除状态
     */
    private Integer deletedFlag;

    /**
     * 备注
     */
    private String remark;

    @UpdateTime(FillStrategy.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @UpdateTime(FillStrategy.INSERT)
    private LocalDateTime createTime;
}
